!function(e) {
    function t(r) {
        if (n[r])
            return n[r].exports;
        var i = n[r] = {
            i: r,
            l: !1,
            exports: {}
        };
        return e[r].call(i.exports, i, i.exports, t),
        i.l = !0,
        i.exports
    }
    var n = {};
    return t.m = e,
    t.c = n,
    t.d = function(e, n, r) {
        t.o(e, n) || Object.defineProperty(e, n, {
            enumerable: !0,
            get: r
        })
    }
    ,
    t.r = function(e) {
        "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {
            value: "Module"
        }),
        Object.defineProperty(e, "__esModule", {
            value: !0
        })
    }
    ,
    t.t = function(e, n) {
        if (1 & n && (e = t(e)),
        8 & n)
            return e;
        if (4 & n && "object" == typeof e && e && e.__esModule)
            return e;
        var r = Object.create(null);
        if (t.r(r),
        Object.defineProperty(r, "default", {
            enumerable: !0,
            value: e
        }),
        2 & n && "string" != typeof e)
            for (var i in e)
                t.d(r, i, function(t) {
                    return e[t]
                }
                .bind(null, i));
        return r
    }
    ,
    t.n = function(e) {
        var n = e && e.__esModule ? function() {
            return e["default"]
        }
        : function() {
            return e
        }
        ;
        return t.d(n, "a", n),
        n
    }
    ,
    t.o = function(e, t) {
        return Object.prototype.hasOwnProperty.call(e, t)
    }
    ,
    t.p = "",
    t(t.s = 114)
}({
    112: function(e, t, n) {
        var r;
        r = function() {
            var e = n(13)
              , t = function(e, t) {
                this.container = e,
                this.options = t
            };
            return t.prototype.tipError = function(t, n) {
                if (e.isMobile())
                    return void $.toast(n);
                var r = this.container
                  , i = r.find("[name=" + t + "]");
                i.nextAll(".error").show().text(n),
                i.addClass("item-error"),
                i.on("focus.validate", function() {
                    $(this).removeClass("item-error").off("focus.validate")
                })
            }
            ,
            t.prototype.validate = function(e) {
                var t = this.options
                  , n = this.container;
                if (n.find(".error").hide(),
                n.find(".item-error").removeClass("item-error"),
                null != e) {
                    $.isArray(e) || (e = [e]),
                    t = {};
                    for (var r = 0; r < e.length; r++) {
                        var i = e[r];
                        t[i] = this.options[i]
                    }
                }
                var o = 0;
                for (var i in t) {
                    var a = t[i]
                      , c = n.find("[name=" + i + "]");
                    if (0 != c.length && !c.is(":hidden")) {
                        var u = null
                          , s = c.val()
                          , f = a.rules;
                        for (var l in f)
                            if ($.isFunction(f[l])) {
                                var d = f[l]();
                                if (!d) {
                                    u = l;
                                    break
                                }
                            } else {
                                if ("required" == l && "" == $.trim(s)) {
                                    u = l;
                                    break
                                }
                                if ("type" == l) {
                                    var v = f.type;
                                    if ("phone" == v) {
                                        var p = /^(1[0-9])\d{9}$/gi;
                                        if (11 != s.length || !p.test(s)) {
                                            u = l;
                                            break
                                        }
                                    }
                                }
                                if ("minLength" == l && s.length < f.minLength) {
                                    u = l;
                                    break
                                }
                                if ("maxLength" == l && s.length > f.maxLength) {
                                    u = l;
                                    break
                                }
                            }
                        null != u && (o++,
                        this.tipError(i, a.message[u]))
                    }
                }
                return 0 == o
            }
            ,
            t
        }
        .call(t, n, t, e),
        !(void 0 !== r && (e.exports = r))
    },
    113: function(e, t, n) {
        var r;
        r = function(e, t) {
            var r = n(12)
              , i = n(13);
            t.init = function() {
                var e = $("#login-wechat");
                e.length > 0 && e.on("click", function() {
                    var t = e.attr("tp");
                    t || (t = 0),
                    r.post("/api/login/create_platform_state", {
                        type: t
                    }).then(function(e) {
                        if (i.isWeixin()) {
                            var n = "wxee1acd934f6fedf6"
                              , r = encodeURIComponent("http://mubu.io/wxlogin")
                              , o = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=" + n + "&redirect_uri=" + r + "&response_type=code&scope=snsapi_userinfo&state=" + t + "#wechat_redirect";
                            location.href = o
                        } else if (i.isMobile())
                            $.alert("微信登录只能在微信客户端中使用<br>请在微信中搜索公众号“幕布”<br>关注后即可在微信中使用幕布");
                        else {
                            var a = e.data.state
                              , n = "wx1dd686ead0ffc496"
                              , r = encodeURIComponent("http://mubu.io/wxlogin")
                              , o = "https://open.weixin.qq.com/connect/qrconnect?appid=" + n + "&redirect_uri=" + r + "&response_type=code&scope=snsapi_login&state=" + a + "#wechat_redirect";
                            location.href = o
                        }
                    })
                });
                var t = $("#login-qq");
                t.length > 0 && t.on("click", function() {
                    var e = t.attr("tp");
                    e || (e = 0),
                    r.post("/api/login/create_platform_state", {
                        type: e
                    }).then(function(e) {
                        var t = e.data.state
                          , n = "101328916"
                          , r = encodeURIComponent("http://mubu.io/qqlogin")
                          , i = "https://graph.qq.com/oauth2.0/authorize?response_type=code&client_id=" + n + "&redirect_uri=" + r + "&scope=get_user_info&state=" + t;
                        location.href = i
                    })
                })
            }
        }
        .call(t, n, t, e),
        !(void 0 !== r && (e.exports = r))
    },
    114: function(e, t, n) {
        var r;
        r = function(e, t) {
            function r() {
                y = !0;
                var e = $("#fetch-code");
                e.text("发送中.."),
                u.post("/api/reg/send_sms_code", {
                    sendId: $("#send-id").val(),
                    phone: $("input[name=phone]").val()
                }).then(function() {
                    y = !1,
                    x = 60,
                    w = setInterval(function() {
                        x--,
                        e.text("已发送(" + x + ")"),
                        0 == x && (e.text("获取验证码"),
                        clearInterval(w))
                    }, 1e3)
                }).fail(function() {
                    y = !1,
                    e.text("获取验证码")
                })
            }
            function i(e, t) {
                return Math.floor(Math.random() * (t - e) + e)
            }
            function o(e, t) {
                var n = i(e, t)
                  , r = i(e, t)
                  , o = i(e, t);
                return "rgb(" + n + "," + r + "," + o + ")"
            }
            function a() {
                d = "";
                var e = document.getElementById("canvas")
                  , t = e.width
                  , n = e.height
                  , r = e.getContext("2d");
                r.textBaseline = "bottom",
                r.fillStyle = o(180, 240),
                r.fillRect(0, 0, t, n);
                for (var a = "ABCEFGHJKLMNPQRSTWXY123456789", c = 0; c < 4; c++) {
                    var u = a[i(0, a.length)];
                    r.fillStyle = o(50, 160),
                    r.font = i(20, 35) + "px SimHei";
                    var s = 10 + 25 * c
                      , f = i(35, 35)
                      , l = i(-35, 35);
                    r.translate(s, f),
                    r.rotate(l * Math.PI / 180),
                    r.fillText(u, 0, 0),
                    r.rotate(-l * Math.PI / 180),
                    r.translate(-s, -f),
                    d += u
                }
                for (var c = 0; c < 6; c++)
                    r.strokeStyle = o(40, 180),
                    r.beginPath(),
                    r.moveTo(i(0, t), i(0, n)),
                    r.lineTo(i(0, t), i(0, n)),
                    r.stroke();
                for (var c = 0; c < 50; c++)
                    r.fillStyle = o(0, 255),
                    r.beginPath(),
                    r.arc(i(0, t), i(0, n), 1, 0, 2 * Math.PI),
                    r.fill()
            }
            var c = n(112)
              , u = n(12)
              , s = n(113)
              , f = n(2);
            s.init();
            var l = $(".fields")
              , d = ""
              , v = "touchstart, mousemove"
              , p = {
                name: {
                    rules: {
                        required: !0
                    },
                    message: {
                        required: "请输入昵称"
                    }
                },
                phone: {
                    rules: {
                        required: !0,
                        type: "phone"
                    },
                    message: {
                        required: "请输入手机号",
                        type: "请输入正确的手机号"
                    }
                },
                code: {
                    rules: {
                        required: !0
                    },
                    message: {
                        required: "请输入验证码"
                    }
                },
                password: {
                    rules: {
                        required: !0,
                        minLength: 6,
                        maxLength: 20
                    },
                    message: {
                        required: "请输入密码",
                        minLength: "请输入至少6个字符",
                        maxLength: "最多允许20个字符"
                    }
                }
            }
              , h = new c(l,p)
              , g = (new Date).getTime().toString(16)
              , m = 1;
            $("#field-phone").on("focus", function() {
                if (!window.focusId) {
                    var e = $("#send-id").val()
                      , t = e.split("-");
                    t[4] = (new Date).getTime().toString(16),
                    window.focusId = t.join("-"),
                    f.set("reg_focusId", window.focusId, {
                        expires: m
                    })
                }
            }),
            $("body").on(v, function() {
                if (!window.prepareId) {
                    var e = $("#send-id").val()
                      , t = e.split("-");
                    t[0] = (new Date).getTime().toString(16),
                    t[1] = g,
                    window.prepareId = t.join("-"),
                    f.set("reg_prepareId", window.prepareId, {
                        expires: m
                    })
                }
            });
            var x = 0
              , w = null
              , y = !1;
            $("#fetch-code").on("click", function() {
                if (h.validate("phone")) {
                    $(this);
                    if (0 != x || y)
                        return;
                    needVerifyCode ? ($("#validate-text").val("").focus(),
                    $("#reg-validate").dlg(),
                    a(),
                    $(".change-validate-img").off().on("click", function() {
                        a()
                    }),
                    $("#reg-validate-btn").off().on("click", function() {
                        var e = $("#validate-text").val().toLowerCase();
                        return e != d.toLowerCase() ? ($.toast("您输入的验证有误，请重新输入"),
                        a(),
                        void $("#validate-text").focus()) : ($("#reg-validate").dlg("close"),
                        void r())
                    })) : r()
                }
            });
            var b = !1;
            $("#submit").on("click", function() {
                if (!b && h.validate()) {
                    b = !0;
                    var e = $("#main-form").serializeArray()
                      , t = {};
                    $.each(e, function() {
                        t[this.name] = this.value
                    }),
                    u.post("/api/reg/submit", t).then(function(e) {
                        location.href = e.data.next
                    }).always(function() {
                        b = !1
                    })
                }
            })
        }
        .call(t, n, t, e),
        !(void 0 !== r && (e.exports = r))
    },
    12: function(e, t, n) {
        var r;
        r = function() {
            var e = {};
            return e.post = function(e, t, n) {
                var r = {
                    url: e,
                    data: t,
                    method: "post",
                    dataType: "json",
                    cache: !1,
                    timeout: 45e3
                }
                  , i = $.Deferred();
                return $.ajax(r).fail(function() {
                    n !== !1 && $.alert("请求处理失败，请稍后尝试。"),
                    i.reject()
                }).then(function(e) {
                    var t = e.code;
                    if (0 === t)
                        i.resolve(e);
                    else if (2 === t) {
                        var n = e.msg;
                        n && $.confirm({
                            title: "请登录",
                            content: n
                        }).then(function() {
                            $.loginWindow()
                        }),
                        i.reject(e)
                    } else {
                        var n = e.msg;
                        n && $.toast(n),
                        i.reject(e)
                    }
                }),
                i
            }
            ,
            e.loadHtml = function(e, t) {
                var n = {
                    url: e,
                    data: t,
                    method: "get",
                    dataType: "html",
                    cache: !1
                }
                  , r = $.Deferred();
                return $.ajax(n).fail(function() {
                    $.alert("加载失败")
                }).then(function(e) {
                    r.resolve(e)
                }),
                r
            }
            ,
            e
        }
        .call(t, n, t, e),
        !(void 0 !== r && (e.exports = r))
    },
    13: function(e, t, n) {
        var r;
        r = function(e, t) {
            t.isWeixin = function() {
                var e = window.navigator.userAgent.toLowerCase();
                return "micromessenger" == e.match(/MicroMessenger/i)
            }
            ,
            t.isMobile = function() {
                var e = window.navigator.userAgent
                  , t = ["Android", "iPhone", "iPod", "iPad", "Windows Phone", "BlackBerry", "MQQBrowser"];
                if (e.indexOf("Windows NT") < 0 && e.indexOf("Macintosh") < 0)
                    for (var n = 0; n < t.length; n++) {
                        var r = t[n];
                        if (e.indexOf(r) >= 0)
                            return !0
                    }
                return !1
            }
            ,
            t.isFirefox = function() {
                var e = navigator.userAgent.toLowerCase();
                return e.indexOf("firefox") > 0
            }
            ,
            t.isChrome = function() {
                var e = navigator.userAgent.toLowerCase();
                return e.indexOf("chrome") > 0 || e.indexOf("chromium") > 0
            }
            ,
            t.isSafari = function() {
                var e = navigator.userAgent.toLowerCase();
                return e.indexOf("safari") > 0 && e.indexOf("version") > 0 && e.indexOf("chrome") < 0 && e.indexOf("chromium") < 0
            }
            ,
            t.isIE = function() {
                var e = navigator.userAgent.toLowerCase();
                return e.indexOf("msie") > 0 || e.indexOf("rv:") > 0 && e.indexOf("trident") > 0 || e.indexOf("edge") > 0
            }
            ,
            t.isEdge = function() {
                var e = navigator.userAgent.toLowerCase();
                return e.indexOf("edge") > 0
            }
            ,
            t.isMac = function() {
                var e = navigator.platform;
                return e.toLowerCase().indexOf("mac") >= 0
            }
            ,
            t.isDesktopClient = function() {
                var e = navigator.userAgent.toLowerCase();
                return e.indexOf("electron") > 0 && (e.indexOf("mubu") > 0 || e.indexOf("幕布") > 0)
            }
            ,
            t.isLark = function() {
                var e = navigator.userAgent.toLowerCase();
                return e.indexOf("lark/") > 0
            }
        }
        .call(t, n, t, e),
        !(void 0 !== r && (e.exports = r))
    },
    2: function(e, t, n) {
        var r;
        r = function(e, t, r) {
            "use strict";
            function i(e) {
                0 === e.indexOf('"') && (e = e.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, "\\"));
                var t = {};
                try {
                    e = decodeURIComponent(e.replace(/\+/g, " ")),
                    $.each(a(e, ";"), function(e, n) {
                        var r = a(n, "=")
                          , i = r[0]
                          , o = r[1];
                        i && (t[i] = o)
                    })
                } catch (n) {}
                return t
            }
            function o(e, t, n) {
                var r = n.expires;
                $.isNumeric(r) && (r = c(new Date, r)),
                document.cookie = [encodeURIComponent(e), "=", encodeURIComponent(t), r ? ";expires=" + r.toUTCString() : "", n.path ? ";path=" + n.path : "", n.domain ? ";domain=" + n.domain : "", n.secure ? ";secure" : ""].join("")
            }
            var a = n(3)
              , c = n(4);
            t.get = function(e) {
                var t = i(document.cookie);
                return "string" === $.type(e) ? t[e] : t
            }
            ,
            t.set = function(e, n, r) {
                $.isPlainObject(e) && (r = n,
                n = null),
                r = $.extend({}, t.defaultOptions, r),
                null === n ? $.each(e, function(e, t) {
                    o(e, t, r)
                }) : o(e, n, r)
            }
            ,
            t.remove = function(e, n) {
                n = n || {},
                n.expires = -1,
                o(e, "", $.extend({}, t.defaultOptions, n))
            }
            ,
            t.defaultOptions = {}
        }
        .call(t, n, t, e),
        !(void 0 !== r && (e.exports = r))
    },
    3: function(e, t, n) {
        var r;
        r = function(e, t, n) {
            "use strict";
            return function(e, t) {
                var n = [];
                return "number" === $.type(e) && (e = "" + e),
                e && "string" === $.type(e) && $.each(e.split(t), function(e, t) {
                    t = $.trim(t),
                    t && n.push(t)
                }),
                n
            }
        }
        .call(t, n, t, e),
        !(void 0 !== r && (e.exports = r))
    },
    4: function(e, t, n) {
        var r;
        r = function(e, t, r) {
            "use strict";
            var i = n(5);
            return function(e, t) {
                return i(e, 24 * t)
            }
        }
        .call(t, n, t, e),
        !(void 0 !== r && (e.exports = r))
    },
    5: function(e, t, n) {
        var r;
        r = function(e, t, r) {
            "use strict";
            var i = n(6);
            return function(e, t) {
                return i(e, 60 * t)
            }
        }
        .call(t, n, t, e),
        !(void 0 !== r && (e.exports = r))
    },
    6: function(e, t, n) {
        var r;
        r = function(e, t, r) {
            "use strict";
            var i = n(7);
            return function(e, t) {
                return i(e, 60 * t)
            }
        }
        .call(t, n, t, e),
        !(void 0 !== r && (e.exports = r))
    },
    7: function(e, t, n) {
        var r;
        r = function(e, t, n) {
            "use strict";
            return function(e, t) {
                return "date" === $.type(e) && (e = e.getTime()),
                new Date(e + 1e3 * t)
            }
        }
        .call(t, n, t, e),
        !(void 0 !== r && (e.exports = r))
    }
});
